<template>
	<el-drawer v-model="drawer" size="100%">
		<portal-render ref="portalRenderRef" />
	</el-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'
import PortalRender from '@/components/portal/render/index.vue'

const portalRenderRef = ref()
const drawer = ref(false)

const openDrawer = (data) => {
	drawer.value = true
	nextTick(() => {
		portalRenderRef.value.setData(data)
	})
}
defineExpose({ openDrawer })
</script>
